# -*- coding:utf-8 -*-
from __future__ import unicode_literals

from wenlincms.conf import register_setting

####################
# 后台设置菜单的顺序，conf的forms.py中调用

menu_order = {"第三方登录": ["WEIBO_APP_KEY", "WEIBO_APP_SECRET", "WECHAT_LOGIN_APP_KEY", "WECHAT_LOGIN_APP_SECRET", ],
              "COMMENTS": [],}

####################

register_setting(
    name="WEIBO_APP_KEY",
    label="微博登录 Key",
    description="新浪微博的第三方登录API：<a href='http://open.weibo.com/' target='_blank'>申请地址</a>",
    editable=True,
    default="",
)

register_setting(
    name="WEIBO_APP_SECRET",
    label="微博登录 Secret",
    description="新浪微博的第三方登录API的密钥。若KEY或密钥为空，则该API不会启用",
    editable=True,
    default="",
)

register_setting(
    name="WECHAT_LOGIN_APP_KEY",
    label="微信登录 Key",
    description="微信平台的网页授权登录API：<a href='https://open.weixin.qq.com/' target='_blank'>申请地址</a>",
    editable=True,
    default="",
)

register_setting(
    name="WECHAT_LOGIN_APP_SECRET",
    label="微信登录 Secret",
    description="微信平台的网页授权登录的密钥。若KEY或密钥为空，则该API不会启用",
    editable=True,
    default="",
)
